package com.hngates.architecture.service.impl;

import java.util.List;
import com.hngates.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hngates.architecture.mapper.ArcLabourSubCompanyDetailsMapper;
import com.hngates.architecture.domain.ArcLabourSubCompanyDetails;
import com.hngates.architecture.service.IArcLabourSubCompanyDetailsService;
import com.hngates.common.core.text.Convert;

/**
 * 劳务分包单位具体情况Service业务层处理
 * 
 * @author jwhe
 * @date 2022-07-04
 */
@Service
public class ArcLabourSubCompanyDetailsServiceImpl implements IArcLabourSubCompanyDetailsService 
{
    @Autowired
    private ArcLabourSubCompanyDetailsMapper arcLabourSubCompanyDetailsMapper;

    /**
     * 查询劳务分包单位具体情况
     * 
     * @param id 劳务分包单位具体情况主键
     * @return 劳务分包单位具体情况
     */
    @Override
    public ArcLabourSubCompanyDetails selectArcLabourSubCompanyDetailsById(Long id)
    {
        return arcLabourSubCompanyDetailsMapper.selectArcLabourSubCompanyDetailsById(id);
    }

    /**
     * 查询劳务分包单位具体情况列表
     * 
     * @param arcLabourSubCompanyDetails 劳务分包单位具体情况
     * @return 劳务分包单位具体情况
     */
    @Override
    public List<ArcLabourSubCompanyDetails> selectArcLabourSubCompanyDetailsList(ArcLabourSubCompanyDetails arcLabourSubCompanyDetails)
    {
        return arcLabourSubCompanyDetailsMapper.selectArcLabourSubCompanyDetailsList(arcLabourSubCompanyDetails);
    }

    /**
     * 新增劳务分包单位具体情况
     * 
     * @param arcLabourSubCompanyDetails 劳务分包单位具体情况
     * @return 结果
     */
    @Override
    public int insertArcLabourSubCompanyDetails(ArcLabourSubCompanyDetails arcLabourSubCompanyDetails)
    {
        arcLabourSubCompanyDetails.setCreateTime(DateUtils.getNowDate());
        return arcLabourSubCompanyDetailsMapper.insertArcLabourSubCompanyDetails(arcLabourSubCompanyDetails);
    }

    /**
     * 修改劳务分包单位具体情况
     * 
     * @param arcLabourSubCompanyDetails 劳务分包单位具体情况
     * @return 结果
     */
    @Override
    public int updateArcLabourSubCompanyDetails(ArcLabourSubCompanyDetails arcLabourSubCompanyDetails)
    {
        arcLabourSubCompanyDetails.setUpdateTime(DateUtils.getNowDate());
        return arcLabourSubCompanyDetailsMapper.updateArcLabourSubCompanyDetails(arcLabourSubCompanyDetails);
    }

    /**
     * 批量删除劳务分包单位具体情况
     * 
     * @param ids 需要删除的劳务分包单位具体情况主键
     * @return 结果
     */
    @Override
    public int deleteArcLabourSubCompanyDetailsByIds(String ids)
    {
        return arcLabourSubCompanyDetailsMapper.deleteArcLabourSubCompanyDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除劳务分包单位具体情况信息
     * 
     * @param id 劳务分包单位具体情况主键
     * @return 结果
     */
    @Override
    public int deleteArcLabourSubCompanyDetailsById(Long id)
    {
        return arcLabourSubCompanyDetailsMapper.deleteArcLabourSubCompanyDetailsById(id);
    }

    @Override
    public ArcLabourSubCompanyDetails selectArcLabourSubCompanyDetailsBySubLabourId(Long labourSubCompanyId) {
        return arcLabourSubCompanyDetailsMapper.selectArcLabourSubCompanyDetailsBySubLabourId(labourSubCompanyId);
    }
}
